// https://github.com/gudh/ihover

.ih-item {
    position: relative;
    border-radius: $border-radius-base;
    @include transition( all 0.35s ease-in-out );
    a {
        color: #333;
        &:hover {
            text-decoration: none;
        }
    }
    img {
        border-radius: $border-radius-base;
        width: 100%;
        height: 100%;
    }
}

.ih-item.ih-material {
    overflow: hidden;
    position: relative;
    width: 100%; 
    height: 100%; 

    .info-mask {
        content: '';
        position: absolute;
        top: -25%;
        left: 0;
        right: 0;
        padding-bottom: 100%;
        border-radius: 50%;
        opacity: 0;
        @include transform( scale(0) );
        @include transition(  all .4s cubic-bezier(.4,0,.2,1) );
    }

    .info-content {
        opacity: 0;
        position: absolute;
        top: 0;
        bottom: 0;
        left:0;
        right: 0;
        @include backface-visibility(hidden);  
        @include transform( scale(.5) );
        @include transition(  all .3s ease );
        &:before {
            content: '';
            display: inline-block;
            vertical-align: middle;
            height: 100%;
            margin-left: -0.5em;            
        }

        .info-inner {
            display: inline-block;
            width: 100%;
            vertical-align: middle;
            text-align: center;
            h3 {
                margin: 0 0 10px;
                text-transform: uppercase;
                color: #fff;
                font-size: 18px;
            }
            p {
                font-style: italic;
                font-size: 12px;
                color: $gray-lighter;
            }
        }
    }

    .bg-white + .info-content,
    .bg-warning + .info-content {
        .info-inner {
            h3 {
                color: $text-color;
            }
            p {
                color: #999;
            }
        }
    }

    a:hover {
        .info-content {
            opacity: 1;
            @include transform( scale(1) );
        }
        .info-mask {
            opacity: .8;
            @include transform( scale(1.21) ); // for 200*300 images
        }
    }
}

$ih-item-box-size: 220px;
.ih-item {
    position: relative;
    @include transition( all 0.35s ease-in-out );

     a {
        color: #333;

        &:hover {
            text-decoration: none;

            .img:before {
                @include box-shadow( inset 0 0 0 110px #333333, inset 0 0 0 16px rgba(255, 255, 255, 0.8), 0 1px 2px rgba(0, 0, 0, 0.1) );
                @include box-shadow( inset 0 0 0 110px rgba(0, 0, 0, 0.6), inset 0 0 0 16px rgba(255, 255, 255, 0.8), 0 1px 2px rgba(0, 0, 0, 0.1) );
                @include transform( scale(1) );
            }

            .info {
                @include transform( scale(1) );
                opacity: 1;

                p {
                    opacity: 1;
                }
            }
        }
    }

    img {
        width: 100%;
        height: 100%;
    }

    &.circle {
        border-radius: 50%;
        height: $ih-item-box-size;
        position: relative;
        width: $ih-item-box-size;

        .img {
            position: relative;
            width: $ih-item-box-size;
            height: $ih-item-box-size;
            border-radius: 50%;

            &:before {
                position: absolute;
                display: block;
                content: '';
                width: 100%;
                height: 100%;
                border-radius: 50%;
                @include transition( all 0.35s ease-in-out );
            }

            img {
                border-radius: 50%;
            }
        }

        .info {
            @include backface-visibility(hidden);
            border-radius: 50%;
            bottom: 0;
            left: 0;
            position: absolute;
            right: 0;
            text-align: center;
            top: 0;
            // effect stuff
            opacity: 0;
            @include transform( scale(0) );
            @include transition( all 0.35s ease-in-out );

            p {
                
                @include transform( translate(-50%, -50%) );
                @include transition( all 0.35s ease-in-out );
                color: #FFF;
                font-size: 12px;
                font-style: italic;
                left: 50%;
                margin: 0;
                opacity: 0;
                position: absolute;
                top: 50%;
                width: 100%;
            }
        }
    }
}
